<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>Document</title>
		<link rel="stylesheet" type="text/css" href="../css/unclaimed.css">
	</head>
	<body>
		<header>
			<a href="javascript:history.back(-1)" class="back"><</a>
			<img src="../img/asd.png" width="100%">
			<div>
				<p class="wish"></p>
				<p class="money"></p>
				<!-- <p class="unclaimed">对方未领取，24小时未被领取退还</p> -->
			</div>
		</header>
	</body>
</html>
<script src="../js/jquery-3.3.1.js"></script>
<script type="text/javascript">
	  /*function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
          }
          var status=getUrlParam('status');
          var price=getUrlParam('price');
          var desc=getUrlParam('desc');
          console(status);
          console(price);
          console(desc);
          console(decodeURIComponent(status));
          console(decodeURIComponent(price));
          console(decodeURIComponent(desc));*/
        function GetRequest() {
        var url =decodeURI(decodeURI(location.search)); //获取url中"?"符后的字串，使用了两次decodeRUI解码
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for (var i = 0; i < strs.length; i++) {
                theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
            }
            return theRequest;
        }
    }

      $(function () {
      	var postData = GetRequest();
      	var status=postData.status;
      	var price=postData.price;
      	var desc=postData.desc;
      	if(status=="已领取"){
      		$('.wish').html(status);
      		$('.money').html('');
      	}else{
      		$('.wish').html(desc);
      		$('.money').html(price+"<span>元</span>");
      	}    
    })
   
</script>